<template>
  <div class="home">
    
    <prop-demo 
    :propObj="propObj" 
    :propNum="propDemoNum" 
    @changePropDemoNum="changePropDemoNum"></prop-demo>
    <p>{{ propDemoNum }}</p>
    <p>{{ propObj }}</p>

    <bus></bus>

  </div>
</template>

<script>
import bus from '@/components/bus'
import propDemo from '@/components/propDemo'
export default {
  name: 'Home',
  components: { propDemo, bus },
  data() {
    return {
      propDemoNum: 10,
      propObj: [{a: 1, b: 2}]
    }
  },
  methods: {
    changePropDemoNum(val) {
      console.log("changePropDemoNum -> val", val)
      this.propDemoNum = val
    },
  },
}
</script>
<style lang="less" scoped>

</style>